﻿using Dora.Services.AdminUser.Dto.QueryDto;
using Dora.Services.AdminUser.Dto.SaveDto;
using Dora.Services.AdminUser.Dto.ViewDto;
using Dora.Services.AdminUser.Entities;
using Dora.Tools.Utility.Const;
using Surging.Core.Common;
using Surging.Core.CPlatform.Ioc;
using Surging.Core.CPlatform.Runtime.Server.Implementation.ServiceDiscovery.Attributes;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Dora.Services.AdminUser.IApplication
{
    /// <summary>
    /// 机构文档表服务接口
    /// </summary>
    [ServiceBundle("api/" + DoraModuleName.AdminUser + "/{Service}")]
    public interface IOrgDocService : IServiceKey
    {

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-5", Director = "TTTan", Name = "创建")]
        Task<ResultDto<int>> Create(OrgDocEntity entity);

        /// <summary>
        /// 根据Id获取一个实体对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-5", Director = "TTTan", Name = "根据Id获取一个实体对象")]
        Task<OrgDocEntity> GetById(int id);

        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-5", Director = "TTTan", Name = "分页获取数据")]
        Task<PageDataList<OrgDocViewDto>> GetPageList(OrgDocQueryDto input);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-5", Director = "TTTan", Name = "修改")]
        Task<ResultDto<bool>> Update(OrgDocEntity entity);

        /// <summary>
        /// 根据IdList获取列表
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-5", Director = "TTTan", Name = "根据IdList获取列表")]
        Task<List<OrgDocEntity>> GetList(List<int> idList);

        /// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        [Service(Date = "2019-06-5", Director = "TTTan", Name = "获取所有")]
        Task<List<OrgDocEntity>> GetAll();

        /// <summary>
        /// 根据IdList获取列表
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-06", Director = "TTTan", Name = "获取所有")]
        Task<List<OrgDocEntity>> GetListByTopOrgId(int topOrgId);

        /// <summary>
        /// 复制文档到某个组织机构
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-06", Director = "TTTan", Name = "复制文档到某个组织机构")]
        Task<ResultDto<int>> CopyToOrg(OrgDocCopyDto input);

        /// <summary>
        /// 一份文档创建在多个组织机构下
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-06", Director = "TTTan", Name = "一份文档创建在多个组织机构下")]
        Task<ResultDto<int>> CreateInOrgs(OrgDocSaveDto input);
    }
}
